package cn.ruituo.adv7;

public class Landlord {
    public static void main(String[] args) throws InterruptedException {
        Thread m = Thread.currentThread();
        m.setName("黄世仁");
        Worker worker = new Worker("杨白劳");
        worker.start();
        while (true) {
            m.sleep(1500);
            System.out.println(m.getName() + "睡醒，喊长工干活");
            worker.interrupt();
        }
    }
}
